import { instance } from "../utils/request";
const getOrderDetailsPagination = async (params) => {
	return await instance.get("/OrderDetails/Pagination", params);
};

const addOrderDetails = async (data) => {
	return await instance.post("/OrderDetails/Add", data);
};

const updateOrderDetails = async (data) => {
	return await instance.post("/OrderDetails/Update", data);
};

const getOrderDetailsDetail = async (id) => {
	return await instance.get("/OrderDetails/Detail", { id : id });
};

const deleteOrderDetails = async (id) => {
	return await instance.post("/OrderDetails/Delete", { id : id });
};

const orderDetailsApi = {
	getOrderDetailsPagination,
	addOrderDetails,
	updateOrderDetails,
	getOrderDetailsDetail,
	deleteOrderDetails,
};

export default orderDetailsApi
